<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>DM_GETDLGRECT</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../styles/styles.css">
<script language="javascript" src='../../links.js' type="text/javascript"></script>
</head>
<body>

<h1>DM_GETDLGRECT</h1>
<div class=navbar>
<a  href="index_dm.html">Messages</a> |
<a href="../index.html">Dialog API</a><br>
</div>

<div class=shortdescr>
The <dfn>DM_GETDLGRECT</dfn> allows to retrieve the screen coordinates of the dialog window.
</div>

<h3>Param1</h3>
<div class=descr>
0
</div>

<h3>Param2</h3>
<div class=descr>
Pointer to a <a href="../../winapi/small_rect.html">SMALL_RECT</a>
structure that receives the dialog coordinates.
</div>

<h3>Return</h3>
<div class=descr>
TRUE is returned if the data was retrieved successfully. If  <dfn>Param2</dfn>
is NULL, FALSE is returned.
</div>

<h3>Example</h3>
<div class=descr>
<pre class=code>
struct InitDialogItem InitDlg[]={
...
/*11*/  DI_USERCONTROL,9,4,32,11,0,0,DIF_NOFOCUS,0,"",
...
};

long WINAPI ReversiDialogProc(HANDLE hDlg, int Msg,int Param1,LONG_PTR Param2)
{
...
    case DN_DRAWDLGITEM:
      if(Param1 == 11)
      {
        SMALL_RECT Rect;
        Info.SendDlgMessage(hDlg,DM_GETDLGRECT,0,(LONG_PTR)&amp;Rect);
        ...
              Info.Text(Rect.Left+DialogItem.X1+X*3,
                       Rect.Top+DialogItem.Y1+Y,
                      ColorsPanel[Y&amp;1][X&amp;1]|AddColor,
                      Face);
        ...
...
}</pre>
</div>


<div class=see>See also:</div><div class=seecont>
<a href="../dialogex.html">DialogEx</a><br>
<a href="dm_getdlgitem.html">DM_GETDLGITEM</a><br>
<a href="dm_getitemposition.html">DM_GETITEMPOSITION</a><br>

</div>

</body>
</html>
